<?php
/**
 * [weliam] Copyright (c) 2016/3/23
 * index.ctrl
 * 个人中心控制器
 */
defined('IN_IA') or exit('Access Denied');
$op = !empty($_GPC['op']) ? $_GPC['op'] : 'display';
wl_load()->model('functions');
$banquanfunction=checkfunc(8170);
$partjobfunction=checkfunc(8167);
$pagetitle = '个人中心';

if($op =='display'){
	$member = getMember($openid);
	if(!$member['credit1']){
		$member['credit1'] = '0.00';
	}
	if(!$member['credit2']){
		$member['credit2'] = '0.00';
	}
	$coupons=pdo_fetchall("select id from ".tablename('tg_coupon')." where openid=:openid and uniacid=:uniacid and use_time=0 and end_time>:end_time",array(':openid' => $openid, ':uniacid' => $_W['uniacid'],'end_time'=>TIMESTAMP));
	$tatal = count($coupons);
	include wl_template('user');
}
exit();
